package thread;
public class Demo4 {
    public static void main(String[] args){
        Runnable runnable = new Runnable(){
            public void run(){
                while(true){
                    System.out.println(" hello Thread4");
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        };
        Thread t = new Thread(runnable);
        t.start();
    }
}
